import requests
import jsonpath


def test_login01():
    url = "http://shop-xo.hctestedu.com/index.php?s=/api/user/login/"
    pub_params = {'application': 'app', 'application_client_type': 'weixin'}
    data = {
        "accounts": "youyi",
        "pwd": "123456",
        "type": "username"
    }

    res = requests.post(url, params=pub_params, data=data)
    print(res.json())

    # 示例：使用jsonpath提取响应数据
    # result = jsonpath(res.json(), '$.data.token')
    # print(result)


